<template>
	<page-body>
		<view class="page">
			<!-- 3.0版本的 -->
			<!-- <web-view src="https://jyalk.zhuaizhuaiyu.com/shuziren/" /> -->
			<web-view :src="url" />
		</view>
	</page-body>
</template>

<script>
	export default {
		data() {
			return {
				url:'http://dev.gj.shuziren.zhongbenjiaoyu.cn/',
			}
		},
		onLoad(options) {
			console.log(options.group)
			this.url='http://dev.gj.shuziren.zhongbenjiaoyu.cn/?group='+options.group
			console.log(this.url)
			this.requestRecordPermission()
		},
		methods: {
			requestRecordPermission() {
				// #ifdef APP-PLUS
				// App 端权限申请
				plus.android.requestPermissions(
					['android.permission.RECORD_AUDIO'],
					(result) => {
						if (result.granted.length > 0) {
							console.log("录音权限已授权");
						} else {
							uni.showModal({
								title: "提示",
								content: "请开启麦克风权限以使用语音功能",
								showCancel: false
							});
						}
					},
					(error) => {
						console.error("权限请求失败: ", error);
					}
				);
				// #endif

				// #ifdef MP-WEIXIN
				// 微信小程序端权限申请
				wx.authorize({
					scope: 'scope.record',
					success() {
						console.log("微信小程序录音权限已授权");
					},
					fail() {
						uni.showModal({
							title: "提示",
							content: "请在设置中开启录音权限",
							showCancel: false
						});
					}
				});
				// #endif
			}
		}
	}
</script>

<style lang="scss">
	.MyPortrayal_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.MyPortrayal_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		line-height: 50rpx;
	}

	.MyPortrayal_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.MyPortrayal_fd0_0_c0 {
		width: 120rpx;
	}

	.MyPortrayal_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.MyPortrayal_flex_1 {
		padding: 24rpx;
	}

	.MyPortrayal_fd1_7_c1_c1_c0 {
		font-size: 24rpx;
		color: rgba(102, 102, 102, 1);
		font-weight: 400;
		line-height: 48rpx;
	}

	.MyPortrayal_fd1_7_c1_c1 {
		background: #f3f6f8;
		border-radius: 16rpx;
		background-size: 100% auto;
		padding: 24rpx;
	}

	.MyPortrayal_fd1_7_c1_c0_c2_c0 {
		font-size: 24rpx;
		color: #333;
		font-weight: 500;
		line-height: 33rpx;
	}

	.MyPortrayal_progress1_fd1_7_c1_c0_c1_c0 {
		background: rgba(20, 94, 253, 1);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}

	.MyPortrayal_fd1_7_c1_c0_c1_c0 {
		border: 1px solid rgba(20, 94, 253, 0.1);
		background: rgba(20, 94, 253, 0.1);
		width: 300rpx;
		height: 20rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		background-size: 100% auto;
	}

	.MyPortrayal_fd1_7_c1_c0_c0_c1 {
		color: rgba(20, 94, 253, 1);
		font-size: 32rpx;
		font-weight: 700;
		line-height: 32rpx;
		text-decoration: none;
	}

	.MyPortrayal_fd1_7_c1_c0_c0_c0 {
		font-size: 48rpx;
		line-height: 56rpx;
		font-weight: 700;
		color: rgba(20, 94, 253, 1);
	}

	.MyPortrayal_fd1_7_c1_c0 {
		background: #f3f6f8;
		border-radius: 16rpx;
		background-size: 100% auto;
		padding: 24rpx;
		height: 286rpx;
	}

	.MyPortrayal_linefd1_7_c0 {
		background: #145efd;
		width: 50rpx;
		height: 8rpx;
		top: 80rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx;
	}
</style>